package org.swust.monitor.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.swust.monitor.dto.SysUserDto;
import org.swust.monitor.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.swust.monitor.entity.qparam.QSysUser;

/**
 * <p>
 * 系统用户表 Mapper 接口
 * </p>
 *
 * @author 111
 * @since 2024-12-24
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    IPage<SysUserDto> pageUser(IPage page, @Param("param") QSysUser qSysUser);
    @Update("update sys_user set password = #{psw} where user_id = #{userId}")
    int resetPwd(Integer userId, String psw);
}
